package stats.web;

import java.util.logging.Logger;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class TestController2 {

    private Logger log = Logger.getAnonymousLogger();

    @RequestMapping("hello3")
    public ModelAndView sayHello(@RequestParam("number") int number) {
        log.info("Hello 3 request got");
        ModelAndView res = new ModelAndView();
        res.setViewName("hello");
        res.addObject("myModel", number + 11);
        return res;
    }

    @RequestMapping("hello4")
    public String sayHello2() {
        log.info("Hello 4 request got");
        return "hello";
    }
}
